<br />

<p class='text-center lead'>新建议列表</p>

<script language="JavaScript" type="text/javascript" src='http://<?php echo base_url(); ?>assets/JS/jquery.tablesorter.js'></script>

<br />
<br />

<table class='table table-striped table-bordered' id = 'mytable'>
	<thead>
	<tr  class="info">
	<th class="col-md-2" ><strong>客户</strong></th>
	<th class="col-md-2" ><strong>联系人</strong></th>
	<th class="col-md-1" ><strong>负责人</strong></th>
	<th class="col-md-1" ><strong>联系日期</strong></th>
	<th class="col-md-1" ><strong>联系方式</strong></th>
	<th class="col-md-3" ><strong>状态</strong></th>
	<th class="col-md-2" ><strong>领导建议</strong></th>
	</tr>
	</thead>
	
	<tbody>
	{records}
		<tr>
		<td>{client_name}</td>
		<td>{contact_name}</td>
		<td>{name}</td>
		<td>{contact_date}</td>
		<td>{means}</td>
		<td>{status}</td>
		<td>{comment}
			<a class='btn btn-success btn-sm comment' id = {id}>已执行</a>
		</td>
		</tr>
	{/records}
	</tbody>
</table>

<script type = "text/javascript">
jQuery(function() {

		
		//意见已按钮，异步更新c_status
		jQuery("a.comment").click(function(){
			var x = jQuery(this).attr("id");
			jQuery(this).parent().parent().addClass("hidden");
			jQuery.post("http://<?php echo base_url(); ?>index.php/contact_record/ajax_do_comment",
				{
					id:x
				});
			
		});
	});

</script>

<script type="text/javascript">
	jQuery("#mytable").tablesorter();
</script>